Optimal. Leaf size=238 \[ \frac {E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 b}{a+b}\right ) \sqrt {a+b \sin (e+f x)}}{c f \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}-\frac {(a-b) F\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}{c f \sqrt {a+b \sin (e+f x)}}+\frac {2 a \Pi \left (2;\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}{c f \sqrt {a+b \sin (e+f x)}}+\frac {\cos (e+f x) \sqrt {a+b \sin (e+f x)}}{f (c+c \sin (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.34, antiderivative size = 238, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 9, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {3014, 2886,
2884, 2847, 2831, 2742, 2740, 2734, 2732} \begin {gather*} \frac {\cos (e+f x) \sqrt {a+b \sin (e+f x)}}{f (c \sin (e+f x)+c)}-\frac {(a-b) \sqrt {\frac {a+b \sin (e+f x)}{a+b}} F\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{c f \sqrt {a+b \sin (e+f x)}}+\frac {\sqrt {a+b \sin (e+f x)} E\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{c f \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}+\frac {2 a \sqrt {\frac {a+b \sin (e+f x)}{a+b}} \Pi \left (2;\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{c f \sqrt {a+b \sin (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2831
Rule 2847
Rule 2884
Rule 2886
Rule 3014
Rubi steps
\begin {align*} \int \frac {\csc (e+f x) \sqrt {a+b \sin (e+f x)}}{c+c \sin (e+f x)} \, dx &=(-a+b) \int \frac {1}{\sqrt {a+b \sin (e+f x)} (c+c \sin (e+f x))} \, dx+\frac {a \int \frac {\csc (e+f x)}{\sqrt {a+b \sin (e+f x)}} \, dx}{c}\\ &=\frac {\cos (e+f x) \sqrt {a+b \sin (e+f x)}}{f (c+c \sin (e+f x))}-\frac {b \int \frac {-\frac {c}{2}-\frac {1}{2} c \sin (e+f x)}{\sqrt {a+b \sin (e+f x)}} \, dx}{c^2}+\frac {\left (a \sqrt {\frac {a+b \sin (e+f x)}{a+b}}\right ) \int \frac {\csc (e+f x)}{\sqrt {\frac {a}{a+b}+\frac {b \sin (e+f x)}{a+b}}} \, dx}{c \sqrt {a+b \sin (e+f x)}}\\ &=\frac {2 a \Pi \left (2;\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}{c f \sqrt {a+b \sin (e+f x)}}+\frac {\cos (e+f x) \sqrt {a+b \sin (e+f x)}}{f (c+c \sin (e+f x))}+\frac {\int \sqrt {a+b \sin (e+f x)} \, dx}{2 c}-\frac {(a-b) \int \frac {1}{\sqrt {a+b \sin (e+f x)}} \, dx}{2 c}\\ &=\frac {2 a \Pi \left (2;\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}{c f \sqrt {a+b \sin (e+f x)}}+\frac {\cos (e+f x) \sqrt {a+b \sin (e+f x)}}{f (c+c \sin (e+f x))}+\frac {\sqrt {a+b \sin (e+f x)} \int \sqrt {\frac {a}{a+b}+\frac {b \sin (e+f x)}{a+b}} \, dx}{2 c \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}-\frac {\left ((a-b) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \sin (e+f x)}{a+b}}} \, dx}{2 c \sqrt {a+b \sin (e+f x)}}\\ &=\frac {E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 b}{a+b}\right ) \sqrt {a+b \sin (e+f x)}}{c f \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}-\frac {(a-b) F\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}{c f \sqrt {a+b \sin (e+f x)}}+\frac {2 a \Pi \left (2;\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}{c f \sqrt {a+b \sin (e+f x)}}+\frac {\cos (e+f x) \sqrt {a+b \sin (e+f x)}}{f (c+c \sin (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 16.36, size = 452, normalized size = 1.90 \begin {gather*} \frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (-8 \sin \left (\frac {1}{2} (e+f x)\right ) \sqrt {a+b \sin (e+f x)}+\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (-\frac {2 i \left (-2 a (a-b) E\left (i \sinh ^{-1}\left (\sqrt {-\frac {1}{a+b}} \sqrt {a+b \sin (e+f x)}\right )|\frac {a+b}{a-b}\right )+b \left (-2 a F\left (i \sinh ^{-1}\left (\sqrt {-\frac {1}{a+b}} \sqrt {a+b \sin (e+f x)}\right )|\frac {a+b}{a-b}\right )+b \Pi \left (\frac {a+b}{a};i \sinh ^{-1}\left (\sqrt {-\frac {1}{a+b}} \sqrt {a+b \sin (e+f x)}\right )|\frac {a+b}{a-b}\right )\right )\right ) \sec (e+f x) \sqrt {-\frac {b (-1+\sin (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sin (e+f x))}{a-b}}}{a b \sqrt {-\frac {1}{a+b}}}+4 \sqrt {a+b \sin (e+f x)}-\frac {4 b F\left (\frac {1}{4} (-2 e+\pi -2 f x)|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}{\sqrt {a+b \sin (e+f x)}}-\frac {2 (4 a+b) \Pi \left (2;\frac {1}{4} (-2 e+\pi -2 f x)|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}{\sqrt {a+b \sin (e+f x)}}\right )\right )}{4 c f (1+\sin (e+f x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 33.06, size = 593, normalized size = 2.49
method | result | size |
default | \(\frac {\sqrt {-\left (-b \sin \left (f x +e \right )-a \right ) \left (\cos ^{2}\left (f x +e \right )\right )}\, \left (-\frac {2 \left (\frac {a}{b}-1\right ) \sqrt {\frac {a +b \sin \left (f x +e \right )}{a -b}}\, \sqrt {\frac {\left (1-\sin \left (f x +e \right )\right ) b}{a +b}}\, \sqrt {\frac {\left (-1-\sin \left (f x +e \right )\right ) b}{a -b}}\, b \EllipticPi \left (\sqrt {\frac {a +b \sin \left (f x +e \right )}{a -b}}, -\frac {\left (-\frac {a}{b}+1\right ) b}{a}, \sqrt {\frac {a -b}{a +b}}\right )}{\sqrt {-\left (-b \sin \left (f x +e \right )-a \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}+\left (-a +b \right ) \left (-\frac {-b \left (\sin ^{2}\left (f x +e \right )\right )-a \sin \left (f x +e \right )+b \sin \left (f x +e \right )+a}{\left (a -b \right ) \sqrt {\left (1+\sin \left (f x +e \right )\right ) \left (\sin \left (f x +e \right )-1\right ) \left (-b \sin \left (f x +e \right )-a \right )}}-\frac {2 b \left (\frac {a}{b}-1\right ) \sqrt {\frac {a +b \sin \left (f x +e \right )}{a -b}}\, \sqrt {\frac {\left (1-\sin \left (f x +e \right )\right ) b}{a +b}}\, \sqrt {\frac {\left (-1-\sin \left (f x +e \right )\right ) b}{a -b}}\, \EllipticF \left (\sqrt {\frac {a +b \sin \left (f x +e \right )}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right )}{\left (2 a -2 b \right ) \sqrt {-\left (-b \sin \left (f x +e \right )-a \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}-\frac {b \left (\frac {a}{b}-1\right ) \sqrt {\frac {a +b \sin \left (f x +e \right )}{a -b}}\, \sqrt {\frac {\left (1-\sin \left (f x +e \right )\right ) b}{a +b}}\, \sqrt {\frac {\left (-1-\sin \left (f x +e \right )\right ) b}{a -b}}\, \left (\left (-\frac {a}{b}-1\right ) \EllipticE \left (\sqrt {\frac {a +b \sin \left (f x +e \right )}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right )+\EllipticF \left (\sqrt {\frac {a +b \sin \left (f x +e \right )}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right )\right )}{\left (a -b \right ) \sqrt {-\left (-b \sin \left (f x +e \right )-a \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}\right )\right )}{c \cos \left (f x +e \right ) \sqrt {a +b \sin \left (f x +e \right )}\, f}\) | \(593\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\sqrt {a + b \sin {\left (e + f x \right )}}}{\sin ^{2}{\left (e + f x \right )} + \sin {\left (e + f x \right )}}\, dx}{c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\sqrt {a+b\,\sin \left (e+f\,x\right )}}{\sin \left (e+f\,x\right )\,\left (c+c\,\sin \left (e+f\,x\right )\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________